package cn.cvs.mybatisplusvue.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ResultVo<T> {
    private String code;
    private String message;
    private T data;


    public static<T> ResultVo<T> success(String message,T data) {
        return new ResultVo<T>("2000",message,data);
    }

    public static<T> ResultVo error(String message){
        return new ResultVo<T>("5000",message,null);
    }
}
